<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>循环</title>
</head>
<body>

<div id="app">

    <li v-for="(item,index) in items">
        {{item.message}}--{{index}}
    </li>


</div>

<!--1.导入vue.js-->
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.21/dist/vue.min.js"></script>
<script>
    var vm = new Vue({
        el: "#app",
        // Model：数据
        data: {
            items: [
                {message: '狂神说Java'},
                {message: '狂神前端'},
                {message: '狂神说运维'}
            ]
        }
    });
</script>
</body>
</html>